package com.nineclock.document.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.nineclock.document.pojo.DocFile;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface DocFileMapper extends BaseMapper<DocFile> {
    @Select("select * from doc_file where id in(select file_id from doc_collaborations where collaboration_id = #{companyUserId}) and folder_id = #{parentFoldId}")
    List<DocFile> findFileByUserIsCollaborator(@Param("companyUserId") Long companyUserId, @Param("parentFoldId") Long parentFoldId);
}
